#include "staff.h"
int process_client_request(int newfd,Msg *msg)
{
	printf("------------%s-----------%d.\n",__func__,__LINE__);
	switch (msg->msgtype)
	{
	case USER_LOGIN:
	case ADMIN_LOGIN:
		process_user_or_admin_login_request(newfd,msg);
		break;
	case USER_MODIFY:
		process_user_modify_request(newfd,msg);
		break;
	case USER_QUERY:
		process_user_query_request(newfd,msg);
		break;
	case ADMIN_MODIFY:
		process_admin_modify_request(newfd,msg);
		break;

	case ADMIN_ADDUSER:
		process_admin_adduser_request(newfd,msg);
		break;

	case ADMIN_DELUSER:
		process_admin_deluser_request(newfd,msg);
		break;
	case ADMIN_QUERY:
		process_admin_query_request(newfd,msg);
		break;
	case ADMIN_HISTORY:
		process_admin_history_request(newfd,msg);
		break;
	case ADMIN_DELHISTORY:
		process_client_delhistory_request(newfd,msg);
	case QUIT:
		process_client_quit_request(newfd,msg);
		break;
	default:
		break;
	}
 return SUCCESS;
}
